import service from '@/utils/request'

// @Tags Branch
// @Summary 创建Branch
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Branch true "创建Branch"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /branch/createBranch [post]
export const createBranch = (data) => {
  return service({
    url: '/branch/createBranch',
    method: 'post',
    data
  })
}

// @Tags Branch
// @Summary 删除Branch
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Branch true "删除Branch"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /branch/deleteBranch [delete]
export const deleteBranch = (data) => {
  return service({
    url: '/branch/deleteBranch',
    method: 'delete',
    data
  })
}

// @Tags Branch
// @Summary 删除Branch
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除Branch"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /branch/deleteBranch [delete]
export const deleteBranchByIds = (data) => {
  return service({
    url: '/branch/deleteBranchByIds',
    method: 'delete',
    data
  })
}

// @Tags Branch
// @Summary 更新Branch
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Branch true "更新Branch"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /branch/updateBranch [put]
export const updateBranch = (data) => {
  return service({
    url: '/branch/updateBranch',
    method: 'put',
    data
  })
}

// @Tags Branch
// @Summary 用id查询Branch
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.Branch true "用id查询Branch"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /branch/findBranch [get]
export const findBranch = (params) => {
  return service({
    url: '/branch/findBranch',
    method: 'get',
    params
  })
}

// @Tags Branch
// @Summary 分页获取Branch列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取Branch列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /branch/getBranchList [get]
export const getBranchList = (params) => {
  return service({
    url: '/branch/getBranchList',
    method: 'get',
    params
  })
}
